# Nginx Backend Web Server

proxy_read_timeout 1h;
proxy_http_version 1.1;
proxy_set_header Host $host;

proxy_buffers {{ proxy_buffers|default("4 8k",true) }};
proxy_buffer_size {{ proxy_buffer_size|default("8k",true) }};

# These are only set on a backend web server
set_real_ip_from 10.0.0.0/8;

# Look at the Upgrade header.
# If set, then also set Connection to "upgrade"
# If not set, do not send a Connection header upstream
map $http_upgrade $upstream_connection_header {
    default upgrade;
    '' '';
}
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $upstream_connection_header;
